OpenBuildings GenerativeComponents Help

Creating a Surface from the Line.EndPoints

You can now use the Lists of Line.Endpoint’s of the sections to define a BSplineSurface, which will be the design surface for the roof.
  1. From the Node Types dialog, select the BSplineSurface node.
  2. Select the ByPoints technique for newly created bsplineSurface1 node. You could also use ByPoles but the surface would not pass through the high point.
  3. For the required input Points, you need to create a nested List. A nested list is of rank 2, which means it is a list of lists, which is essentially Lists nested inside another List. For instance {{0,0.2,0.3},{0.1,0.5,0.4}} But here you need references to Points instead of numbers to construct the surface.
    Remember: The lines (line1, line2 and line3) are replicated already and therefore form Lists of Lines. Therefore their EndPoints (parameter) are also Lists which you can reference directly. For instance, line1.EndPoint.
    1. In the Graph, click on the Points input of bslineSurface1. The Points expression field appears.
    2. Place the cursor in the expression field.
    3. Press and hold <Ctrl>, and select the lines that make up one of the upside down tees in the model view in this order: line02, line01, and line03. The curly brackets are added automatically along with the selected line instances' index. The index [5] if left in the List, would refer only to the EndPoint parameter of the selected line. You will need to remove the index to refer to all the line instances' EndPoint parameters.
    4. Back in the Graph, click the small square icon (Open the full script editor) located on the left side of the expression field. The Script Editor dialog opens containing the expression.
    5. Edit the expression starting with line2[5]. Delete the index portion [5]. Replace with .End. You will note that as soon as you entered the period character, the parameters drop list appeared, and as you typed End, the parameter list jumped to the EndPoint parameter. Double click EndPoint to insert it in the expression. Repeat for the line1[5] and line2[5] portions of the expression to finish the expression {line2.EndPoint, line1.EndPoint, line3.EndPoint}.
    6. Click Apply. The expression is applied to the model.
  4. Record User Changes into Transaction file.